Skip to content

Conversation

fee1-dead
Copy link
Member

This does not cover all builtin impls, but ones that I were able to go over within a cycle.

r? @lcnr

Let me know if the place isn't correct for these, or if you'd like me to change how the impls are presented ^^

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Mar 9, 2024
@rustbot
Copy link
Collaborator

rustbot commented Mar 9, 2024

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

Comment on lines 191 to 200
/// ```rust,ignore (not valid rust syntax)
/// impl Sized for u*, i*, bool, f*, FnPtr, FnDef, *(const/mut) T, char, &mut? T, [T; N], dyn* Trait, !
///
/// impl Sized for (T1, T2, .., Tn) where T1: Sized, T2: Sized, .. Tn: Sized
///
/// impl Sized for Adt where T: Sized forall T in field types
/// ```
///
/// note that `[T; N]` is unconditionally sized since `T: Sized` is required for the array type to be
/// well-formed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My initial reaction was that I would prefer moving the comment for each builtin impl to the most specific place possible, having only a single impl per comment. This would mostly correspond to commenting the match arms on the self_ty matches in most cases.

I worry that these comments here can easily get out of date. E.g. When changing instantiate_constituent_tys_for_sized_trait we likely won't remember updating this function 🤔 E.g. this function currently diverges from the old solver by checking that all tuple fields are sized, not only the last one

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, that would work. I will move these.

@lcnr
Copy link
Contributor

lcnr commented Mar 14, 2024

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Mar 14, 2024

📌 Commit 69d781a has been approved by lcnr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 14, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 14, 2024
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#119029 (Avoid closing invalid handles)
 - rust-lang#122238 (Document some builtin impls in the next solver)
 - rust-lang#122247 (rustdoc-search: depth limit `T<U>` -> `U` unboxing)
 - rust-lang#122287 (add test ensuring simd codegen checks don't run when a static assertion failed)
 - rust-lang#122368 (chore: remove repetitive words)
 - rust-lang#122397 (Various cleanups around the const eval query providers)
 - rust-lang#122406 (Fix WF for `AsyncFnKindHelper` in new trait solver)
 - rust-lang#122477 (Change some attribute to only_local)
 - rust-lang#122482 (Ungate the `UNKNOWN_OR_MALFORMED_DIAGNOSTIC_ATTRIBUTES` lint)
 - rust-lang#122490 (Update build instructions for OpenHarmony)

Failed merges:

 - rust-lang#122471 (preserve span when evaluating mir::ConstOperand)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7997ef4 into rust-lang:master Mar 14, 2024
@rustbot rustbot added this to the 1.78.0 milestone Mar 14, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 14, 2024
Rollup merge of rust-lang#122238 - fee1-dead-contrib:builtin-impl-next-solver-dox, r=lcnr

Document some builtin impls in the next solver

This does not cover all builtin impls, but ones that I were able to go over within a cycle.

r? `@lcnr`

Let me know if the place isn't correct for these, or if you'd like me to change how the impls are presented ^^
@fee1-dead fee1-dead deleted the builtin-impl-next-solver-dox branch April 11, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants